﻿using House.Common;
using House.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace House.IService
{
    public interface IAdminUserService
    {
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="login"></param>
        /// <returns></returns>
        AjaxResult<bool>  Login(LoginDTO login);

        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="admin"></param>
        /// <returns></returns>
        AjaxResult<bool> Insert(AdminUserAddDTO admin);

        /// <summary>
        /// 分页数据
        /// </summary>
        /// <param name="start"></param>
        /// <param name="length"></param>
        /// <param name="name"></param>
        /// <param name="rowCount"></param>
        /// <returns></returns>
        List<AdminUserDTO> GetList(int start, int length, string name, ref long rowCount);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AjaxResult<bool> Delete(params long[] id);
        AjaxResult<bool> Update(AdminUserEditDTO admin);
        AdminUserEditDTO GetEdit(long id);
    }
}
